home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / ellis / gc2.ps (.svg) < prev    next >
Encapsulated PostScript  |  1993-07-23  |  83KB  |  527x905  |  8-bit (136 colors)
Labels: black | darkness
OCR: usedelete;dndeed, dhe afecubset@rohibitsats@se, dincedtds anherentlydinsafe. Butcheredare two@mportantdeasonsdorallowing delete@fcollected objects. First, programmersadapting@ld@odednayavant do disegarbagedollections backupdo@atch existing storage deaks, awhile makingasdew@hanges as possible. Thisduggests dhatdielete applieddod collected object should, atadminimum, anvokedhe object'salestructors ammediately. Second, programmers writing new@arbage-collected@odemaydvantdodisedie letedsa performance hintɗordhecollector, suggesting that some particular objects andedeleted immediately. Depending@ndhedmplementation,dhismaydignificantly deducedhe doadondhe collector.dmplementingammediate deletionds@asyavithamark-and-sweepalgorithms, but dive don't know how copying algorithmscmightdake advantage of the deletionchints. Allowing explicit deletionofcollected objectsdetsprogrammers@ptimizedesource-critical sections fdheirdystems. Often, dargedystemshavedmall, circumscribeddections that are responsibledordargedractions ofdotal torageallocated, and whiledt may becharddoddentify all objects that can bedafely deleted, at's often asydoddentify many branost objects which an. Programmers andise@xplicit deletiondomakedhe@asydafe@ptimizations, delying ongarbage collectiondo@atchnydeftoverobjects dhatdveredmissed orcharddoddelete safely. In both these scenarios, deletedsanherentlyansafe and discusedequirescaredod void bugs that can't be detectedatcompiledime@raun-time. The program may prematurely delete can object, creating dangling pointers. Also, dvhenadapting@ld@ode,dhe programmeramustdealize that the collectordvillanvokedhe destructors of collected objects asynchronously canddhat dhe old codedmay hot be prepared fordhat. Despite these problems, avedhinkdhat allowing deletion of collected objects will be sufficiently usefuldhatat shouldn't be outlawed.dt's very easy dodmplement collectors and simply ignoredhe deletion hint).dt also follows the spirit of C++, providing programmers with dangerous powerdool;dhose programmersdvhodon't want doutdheir handsoff@anduse burdafe subset, which prohibitsdhedise falelete Finally, declaringaalassdodecan@ffect uppliesdhealassawithdhe garbage collector's allocation and deallocation methods. Thus,dhere's hodeasondoradyc@lassalsododhavean overloaded chewordelete, and any attempt dododomust edprogramming mistake.